home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Newton Sample Code 1.2 / Data Storage (Soups) / LostInSpaceCode / SpaceWars / Project Data next >
Encoding:
Text File  |  1994-03-19  |  1.5 KB  |  45 lines  |  [TEXT/R*ch]

  1. /*
  2. ** Copyright: © Michael S. Engber, 1994. All Rights Reserved.
  3. **
  4. ** Project Data for SpaceWars
  5. **
  6. ** This project illustrates the differences between different
  7. ** ways of storing data in your package.
  8. **
  9. **                                  package size in bytes
  10. **                                uncompressed   compressed
  11. **    Data Structure                (on Mac)     (on Newton)  
  12. **  --------------------          ------------   -----------
  13. **  array of frames (naive)           35538         11884
  14. **  array of frames (map sharing)     25970          8932
  15. **  array of arrays                   25866          8860
  16. **  frame of frames                   22386          9176
  17. **  binary object                      9962          5328
  18. **  soup                                            37260
  19. **  store part                        35012         14900
  20. **
  21. */
  22.  
  23. constant kAppString := "SpaceWars:Avarice";
  24.  
  25.  
  26. Load(Home & ":Data.f");
  27. Load(Home & ":DataUtils.f");
  28.  
  29. constant kDataStructure := 'ArrayOfFramesCommonMap;
  30.  
  31. if kDataStructure = 'ArrayOfFramesNaive then
  32.   DefConst('kData,gData)
  33. else if kDataStructure = 'ArrayOfFramesCommonMap then
  34.   DefConst('kData,CloneWithCommonMap(gData))
  35. else if kDataStructure = 'ArrayOfArrays then
  36.   DefConst('kData,DataToArrays(gData))
  37. else if kDataStructure = 'FrameOfFrames then
  38.   DefConst('kData,DataToFrame(gData))
  39. else if kDataStructure = 'BinObj then
  40.   DefConst('kData,DataToBinObj(gData))
  41. else
  42.   Throw('|evt.ex.msg|,"bad kDataStructure");
  43.  
  44. "Reg the Llama";
  45.